import org.apache.hadoop.io.BytesWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class HomeworkMapper extends Mapper<LongWritable, Text, NumberBean, NullWritable> {
    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        String str = value.toString();
        NumberBean numberBean = new NumberBean();
        numberBean.setNumber(Integer.parseInt(str));
        context.write(numberBean, NullWritable.get());
    }
}
